<template>
    <el-dialog class="ba-operate-dialog" width="50%" v-model="baTable.table.extend!.showExpressDialog" center align-center>
        <template #header>
            <div class="title" v-drag="['.ba-operate-dialog', '.el-dialog__header']" v-zoom="'.ba-operate-dialog'">
                {{ '物流轨迹' }}
            </div>
        </template>
        <el-scrollbar v-loading="baTable.form.loading" class="ba-table-form-scrollbar">
            <div
                class="ba-operate-form"
                :class="'ba-' + baTable.form.operate + '-form'"
                :style="'width: calc(100% - ' + baTable.form.labelWidth! / 2 + 'px)'"
            >
                <el-timeline style="padding: 10px">
                    <el-timeline-item
                        v-for="(item, index) in baTable.table.extend!.expressData"
                        :key="index"
                        :timestamp="item.time"
                        :color="item.color"
                        placement="top"
                    >
                        <el-card>{{ item.context }}</el-card>
                    </el-timeline-item>
                </el-timeline>
            </div>
        </el-scrollbar>
        <template #footer>
            <div :style="'width: calc(100% - ' + baTable.form.labelWidth! / 1.8 + 'px)'"></div>
        </template>
    </el-dialog>
</template>
<script setup lang="ts">
import { inject } from 'vue'
import type baTableClass from '/@/utils/baTable'

const baTable = inject('baTable') as baTableClass
</script>

<style scoped lang="scss"></style>
